﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Model;
using Service.User;
using Service.Table;

namespace Service
{
    /// 业务逻辑模块配置
    /// <summary>
    /// 业务逻辑模块配置
    /// </summary>
    public class ServiceConfig
    {
        /// 查询业务模块，需要在这边配置好相关调用接口
        /// <summary>
        /// 查询业务模块，需要在这边配置好相关调用接口
        /// </summary>
        /// <param name="command_id"></param>
        /// <returns></returns>
        public IQueryInterface GetQueryService(int command_id)
        {
            IQueryInterface service = null;
            switch (command_id)
            {
                case 1000:
                    service = new ResponseServerInfo();   // server info
                    break;
                case 1001:
                    service = new AccountService();   //获取账号接口 有就返回，无就创建
                    break;
                case 1101:
                    service = new ResponseGetRoleInfo();   //获取角色信息
                    break;
                case 1102:
                    service = new ResponseGetShipInfo();   //获取船只信息
                    break;
                case 1103:
                    service = new ResponseGetCaptainInfo();   //获取高级将领信息
                    break;
                case 1104:
                    service = new ResponseGetShipTrainInfo();   //获取舰队信息
                    break;
                case 1105:
                    service = new ResponseGetSeaConnectInfo();   //获取海图点位连接信息
                    break;
                case 1106:
                    service = new ResponseGetSeaDetailInfo();   //获取海图详细信息
                    break;
                case 1107:
                    service = new ResponseGetSeaPointInfo();   //获取海图已探索的点信息
                    break;
                case 1108:
                    service = new ResponseGetVoyageInfo();   //获取航行信息
                    break;
                case 1109:
                    service = new ResponseGetQuestInfo();   //获取任务信息
                    break;
                case 1110:
                    service = new ResponseGetShopInfo();   //获取商店
                    break;
                case 1111:
                    service = new ResponseGetSeaMaskInfo();   //获取战争迷雾信息
                    break;
                case 1201:
                    service = new ResponseBuyShip();   //购买船只
                    break;
                case 1202:
                    service = new ResponseBuildShip();   //建造船只
                    break;
                case 1203:
                    service = new ResponseFixShip();   //修理船只
                    break;
                case 1204:
                    service = new ResponseImproveShip();   //获取改造船只
                    break;
                case 1205:
                    service = new ResponseGetRecruitingCaptainInfo();   //获取招募高级船员信息
                    break;
                case 1206:
                    service = new ResponseRecruitingCaptain();   //招募高级船员
                    break;
                case 1207:
                    service = new ResponseFireCaptain();   //开除高级船员
                    break;
                case 1208:
                    service = new ResponseAddSeaman();   //招募普通船员
                    break;
                case 1209:
                    service = new ResponseEditShipTrain();   //更改舰队编制
                    break;
                case 1210:
                    service = new ResponseFixShipConfirm(); //船只修理完成
                    break;
                case 1211:
                    service = new ResponseImproveShipConfirm(); //船只改造完成
                    break;
                case 1301:
                    service = new ResponseRewardQuest();   //完成并领取任务奖励
                    break;
                case 1302:
                    service = new ResponseRemoveQuest();   //删除任务
                    break;
                case 1401:
                    service = new ResponseBuyCommodity();   //购买商品
                    break;
                case 1501:
                    service = new ResponseShipTrainStart();   //起航开始
                    break;
                case 1502:
                    service = new ResponseShipTrainEnd();   //起航结束
                    break;
                case 1503:
                    service = new ResponseShipTrainEvent();   //起航后事件的选择
                    break;
                case 1504:
                    service = new ResponseGetSeaCommodityInfo();   //sea commodity
                    break;
                case 1505:
                    service = new ResponseShipTrainEventCheck();   //航行事件检查
                    break;
                case 1506:
                    service = new ResponseGetSeaPointPopularInfo();   // get sea point popular info
                    break;
                //case 1507:
                //    service = new ResponseShipTrainEndAdventure();   //探索结束
                //    break;

                case 1601:
                    service = new ResponseGetGameEvent();   //获取事件
                    break;
                case 1602:
                    service = new ResponseAddGameEvent();   //添加事件
                    break;
                case 1651:
                    service = new ResponseGetQuests();      //获取任务
                    break;
                case 1652:
                    service = new ResponseRemoveQuest();    //移除任务
                    break;
                case 1653:
                    service = new ResponseRewardQuest();    //领取任务
                    break;
                case 1654:
                    service = new ResponseRefreshQuest();    //刷新任务
                    break;
                case 1655:
                    service = new ResponseCheckQuest();      //mark任务
                    break;
                case 1701:
                    service = new ResponseConstructBuilding();      // construct building
                    break;
                case 1702:
                    service = new ResponseDestroyBuilding();      // destroy building
                    break;
                case 1703:
                    service = new ResponseAddRoad();      // add road
                    break;
                case 1704:
                    service = new ResponseDestroyRoad();      // destroy road
                    break;
                case 1705:
                    service = new ResponseChangeProduceInFactory();      // change produce in factory
                    break;
                case 1706:
                    service = new ResponseGetBuildingInfo();      // get building info list
                    break;
                case 1707:
                    service = new ResponseGetRoadInfo();      // get road info list
                    break;
                case 1708:
                    service = new ResponseGetCollectPointInfo();      // get collect point info list
                    break;
                case 1709:
                    service = new ResponseGetLockZoneInfo();      // get lock zone info list
                    break;
                case 1710:
                    service = new ResponseGetBuildingWorkTaskInfo();      // get building work task info list
                    break;
                case 1711:
                    service = new ResponseSellStorageCommodity();      // sell commodity from storage
                    break;
                case 1712:
                    service = new ResponseUnlockZone();      // unlock zone
                    break;
                case 1713:
                    service = new ResponseLevelupBuilding();      // leve up building
                    break;
                case 1714:
                    service = new ResponseAcceptOrRefuseStorage();      // accept or refuse storage
                    break;
                case 1715:
                    service = new ResponseChangeWorkmanBuilding();      // change workman building
                    break;
                case 1716:
                    service = new ResponseGetRoadPointInfo();      // get road point info
                    break;
                case 1717:
                    service = new ResponseOpenOrCloseAutomaticProduceFactory();      // open or close automatic produce
                    break;
                case 1718:
                    service = new ResponseCollectOrPlantWood();      // collect or plant for wood room
                    break;
                case 1801:
                    service = new ResponseGetCityTechinical();      //get unlocked tech info
                    break;
                case 1802:
                    service = new ResponseUnlockCityTechinical();      // unlocked tech 
                    break;
                case 1901:
                    service = new ResponseChangeRoleName();      // change name 
                    break;
                case 1902:
                    service = new ResponseGetGameInfo();      // game data
                    break;
                default:
                    break;
            }
            return service;
        }
    }
}